//window.open("http://debian/xul/main.xul","XUL Mail","chrome,width=1024,height=768");

APP_NAME = "XUL Mail";

function mainLoad()
{
    var tree = document.getElementById("folder-tree");
    tree.view.selection.select(0);
    document.title = tree.view.getCellText(tree.currentIndex, tree.columns[0]) + " - " + APP_NAME;
}

function folderClick(tree)
{
    document.title = tree.view.getCellText(tree.currentIndex, tree.columns[0]) + " - " + APP_NAME;
    // load messages
}

function getMessage(tree)
{
    $.ajax({
        type: "POST",
        url: "some.php",
        data: "name=John&location=Boston",
        success: function(msg){
            alert( "Data Saved: " + msg );
        }
    });
}

function alertMe()
{
    document.title = "This is going to compose a message";
}
